<?php
class User extends AppModel {
public $validate = array(
        'username' => array(
		   array( 
		    'rule' => 'alphanumeric',
            'required' => true,
			'allowEmpty' => false,
			'message' => "Votre pseudo n'est pas valide"
			),
			array(
			  'rule' => 'isUnique',
    	      'message' => "Ce pseudo est déja pris"
			)
        ),
        'password' => array(
            'rule' => 'notEmpty'
        ),
		'role' => array(
            'rule' => 'notEmpty'
        ),
		'email' => array(
		   array( 
		    'rule' => 'email',
            'required' => true,
			'allowEmpty' => false,
			'message' => "Votre email n'est pas valide"
			),
			array(
			  'rule' => 'isUnique',
    	      'message' => "Cet email est déja pris"
			)
        ),
		'phone' => array(
            'rule' => 'notEmpty'
        ),
		'firstname' => array(
            'rule' => 'notEmpty'
        ),
		'lastname' => array(
            'rule' => 'notEmpty'
        ),
		'professional' => array(
            'rule' => 'notEmpty'
        ),
		'getnews' => array(
            'rule' => 'notEmpty'
        )
    );
}
?>